{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\ev42\Dropbox\ClimateStockMarket\Data\ReplicationLog.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}12 Mar 2024, 13:04:30

{com}. do "C:\Users\ev42\AppData\Local\Temp\STD45f4_000000.tmp"
{txt}
{com}. clear
{txt}
{com}. *set maxvar 32767 
. *Needed packages:
. *net install pretrends, from(`github'/mcaceresb/stata-pretrends/main) replace
. * ssc install estout
. 
. *Set data directory
. cd "C:\Users\ev42\Dropbox\ClimateStockMarket\Data\"
{res}C:\Users\ev42\Dropbox\ClimateStockMarket\Data
{txt}
{com}. 
. *Data on stock market returns
. use "Securities.dta", clear
{txt}
{com}. *Events data
.  merge m:1 datadate using "Time.dta"
{res}{txt}{p 0 7 2}
(variable
{bf:datadate} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             119
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}             119{txt}  (_merge==2)

{col 5}Matched{col 30}{res}         224,660{txt}  (_merge==3)
{col 5}{hline 41}

{com}.  *Firm level information
.  drop _merge
{txt}
{com}. merge m:1 gvkey using "Firms.dta"
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             119
{txt}{col 9}from master{col 30}{res}             119{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}         224,660{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. encode gvkey, gen(cid)
{txt}
{com}. 
. xtset cid tid
{res}
{col 1}{txt:Panel variable: }{res:cid}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:tid}{txt:, }{res:{bind:1}}{txt: to }{res:{bind:1850}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. 
. gen returns=((prccd-l.prccd)/l.prccd)* 100
{txt}(3,072 missing values generated)

{com}. *get rid of highly unusual returns ((prccd/ ajexdi )* trfd ) /( l.prccd/ l.ajexdi )* trfd )) prior time period ]-1)*100)
. 
. gen returns2=(((prccd/ ajexdi )* trfd ) -(( l.prccd/ l.ajexdi )* l.trfd))/(( l.prccd/ l.ajexdi )* l.trfd)*100
{txt}(3,072 missing values generated)

{com}. 
. drop if abs(returns)>50
{txt}(3,094 observations deleted)

{com}. 
. drop if abs(returns2)>50
{txt}(0 observations deleted)

{com}. 
. 
. gen brown=0
{txt}
{com}. replace brown=1 if CoalCU==1 | OilCU==1
{txt}(58,040 real changes made)

{com}. rename renew2 renewables
{res}{txt}
{com}. 
. label define neglab 1 "Plan B Earth1" 2 "Swiss Senior Women1" 3 "Plan B Earth2" 4 "Friends Irish Environment" 5 "Family Farmers v Germany" 6 "Swiss Senior Women2" 7 "Parliamentarians v France" 8 "Plan B Earth3"
{txt}
{com}. 
. label define poslab 1 "Urgenda1" 2 "Urgenda2" 3 "Urgenda3" 4 "Friends Irish Environment" 5 "Commune de Grande-Synthe" 6 "Notre Affaire à Tous1" 7 "Neubauer" 8 "Greenpeace1 v Spain" 9 "Klimaatzaak v Belgium" 10 "Commune de Grande-Synthe2" 11 "Greenpeace2 v Spain" 12 "Greenpeace3 v Spain" 13 "Notre Affaire à Tous2"
{txt}
{com}. 
. label values negative neglab
{txt}
{com}. label values positive poslab
{txt}
{com}. 
. 
. set emptycells drop
{txt}
{com}. gen home=0
{txt}
{com}. replace home=1 if CTCountry==fic
{txt}(216 real changes made)

{com}. 
. *Alternative definition of home country for stock exchange
. gen home2=home
{txt}
{com}. replace home2=1 if CTCountry=="NLD" & NLDc==1
{txt}(9 real changes made)

{com}. replace home2=1 if CTCountry=="DEU" & DEUc==1
{txt}(63 real changes made)

{com}. replace home2=1 if CTCountry=="GBR" & GBRc==1
{txt}(84 real changes made)

{com}. replace home2=1 if CTCountry=="FRA" & FRAc==1
{txt}(26 real changes made)

{com}. replace home2=1 if CTCountry=="ESP" & ESPc==1
{txt}(3 real changes made)

{com}. replace home2=1 if CTCountry=="BEL" & BELc==1
{txt}(1 real change made)

{com}. replace home2=1 if CTCountry=="CHE" & CHEc==1
{txt}(14 real changes made)

{com}. replace home2=1 if CTCountry=="IRL" & IRLc==1
{txt}(0 real changes made)

{com}. 
. gen tid2=tid^2
{txt}
{com}. gen tid3=tid^3
{txt}
{com}. 
. gen ATEhomep=0
{txt}
{com}. replace ATEhomep=1 if pos==1 & home==1
{txt}(131 real changes made)

{com}. label variable ATEhomep "Home country, win"
{txt}
{com}. 
. gen ATEhomen=0
{txt}
{com}. replace ATEhomen=1 if neg==1 & home==1
{txt}(85 real changes made)

{com}. label variable ATEhomen "Home country, loss"
{txt}
{com}. label variable pos "Plaintiff win"
{txt}
{com}. label variable neg "Plaintiff loss"
{txt}
{com}. 
.   gen ATEhomep2=0
{txt}
{com}. replace ATEhomep2=1 if pos==1 & home==1
{txt}(131 real changes made)

{com}. label variable ATEhomep2 "Home country, win"
{txt}
{com}. 
. gen ATEhomen2=0
{txt}
{com}. replace ATEhomen2=1 if neg==1 & home==1
{txt}(85 real changes made)

{com}. label variable ATEhomen2 "Home country, loss"
{txt}
{com}. label variable pos "Plaintiff win"
{txt}
{com}. label variable neg "Plaintiff loss"
{txt}
{com}. 
. gen year=year(datadate)
{txt}
{com}. drop if year==2022
{txt}(0 observations deleted)

{com}. 
. gen renewl=renewables
{txt}(23,342 missing values generated)

{com}. replace renewl=0 if marketvalue < 1000000000
{txt}(20,308 real changes made)

{com}. 
. *gen renewables2=0
. *replace renewables2=1 if SEC=="RWD" | SEC=="RBB" | SEC=="RSR"
. 
. drop if abs(returns)>12
{txt}(1,081 observations deleted)

{com}.  gen EU=1
{txt}
{com}.  replace EU=0 if fic=="GBR" | fic== "CHE" | fic== "NOR"
{txt}(47,869 real changes made)

{com}. 
. xtset cid tid
{res}
{col 1}{txt:Panel variable: }{res:cid}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:tid}{txt:, }{res:{bind:2}}{txt: to }{res:{bind:1850}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. sort cid tid
{txt}
{com}. 
. *redefine event day as just eventN
. gen posj=pos
{txt}
{com}. replace posj=0 if dpos==1
{txt}(1,526 real changes made)

{com}. 
.    gen month=month(datadate)
{txt}
{com}.    gen dayofweek=dow(datadate)
{txt}
{com}. *look at days before and after event
. 
. gen pday=-11
{txt}
{com}. replace pday=dpos if dpos<4
{txt}(5,963 real changes made)

{com}. replace pday=-1 if pday==-11 & f.dpos==0
{txt}(1,517 real changes made)

{com}. replace pday=-2 if pday==-11 & f2.dpos==0
{txt}(1,514 real changes made)

{com}. replace pday=-3 if pday==-11 & f3.dpos==0
{txt}(1,515 real changes made)

{com}. replace pday=-4 if pday==-11 & f4.dpos==0
{txt}(1,512 real changes made)

{com}. replace pday=-5 if pday==-11 & f5.dpos==0
{txt}(1,512 real changes made)

{com}. replace pday=-6 if pday==-11 & f6.dpos==0
{txt}(1,517 real changes made)

{com}. replace pday=-7 if pday==-11 & f7.dpos==0
{txt}(1,385 real changes made)

{com}. replace pday=-8 if pday==-11 & f8.dpos==0
{txt}(1,376 real changes made)

{com}. replace pday=-9 if pday==-11 & f9.dpos==0
{txt}(1,387 real changes made)

{com}. replace pday=-10 if pday==-11 & f10.dpos==0
{txt}(1,387 real changes made)

{com}. 
. replace pday=pday+11
{txt}(220,604 real changes made)

{com}. label define day 0 "ref" 1 "-10" 2 "-9" 3 "-8" 4 "-7" 5 "-6" 6 "-5" 7 "-4" 8 "-3" 9 "-2" 10 "-1" 11 "0" 12 "1" 13 "2" 14 "3"  
{txt}
{com}. label values pday day
{txt}
{com}. 
. *Create dummies for Roth test
.  foreach i of num 1/14 {c -(}
{txt}  2{com}.  gen day`i'=0
{txt}  3{com}.  replace day`i'=1 if pday == `i'
{txt}  4{com}.   {c )-}
{txt}(1,387 real changes made)
(1,387 real changes made)
(1,376 real changes made)
(1,385 real changes made)
(1,517 real changes made)
(1,512 real changes made)
(1,512 real changes made)
(1,515 real changes made)
(1,514 real changes made)
(1,517 real changes made)
(1,648 real changes made)
(1,526 real changes made)
(1,394 real changes made)
(1,395 real changes made)

{com}. 
. *Bringing in event datadate  *Controlling for events
.   drop _merge
{txt}
{com}.   merge 1:1 gvkey datadate using "AnnouncementsShort.dta"
{res}{txt}{p 0 7 2}
(variable
{bf:gvkey} was {bf:str6}, now {bf:str8} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         192,640
{txt}{col 9}from master{col 30}{res}         186,840{txt}  (_merge==1)
{col 9}from using{col 30}{res}           5,800{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          33,764{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. drop if _merge==2
{txt}(5,800 observations deleted)

{com}. 
. drop _merge
{txt}
{com}. 
. xtset cid tid
{res}
{col 1}{txt:Panel variable: }{res:cid}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:tid}{txt:, }{res:{bind:2}}{txt: to }{res:{bind:1850}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. sort cid tid
{txt}
{com}. 
. replace eventN=0 if eventN==.
{txt}(186,840 real changes made)

{com}. replace eventN=0 if (pos==0 & neg==0) & (f.pos==0 & f.neg==0)
{txt}(32,019 real changes made)

{com}. 
. gen linear=(year-2014)*month
{txt}
{com}. gen quadr=linear^2
{txt}
{com}. 
. 
. *Set Output directory
. cd "C:\Users\ev42\Dropbox\Apps\Overleaf\ClimateLitigation\"
{res}C:\Users\ev42\Dropbox\Apps\Overleaf\ClimateLitigation
{txt}
{com}. 
. 
.   est clear
{res}{txt}
{com}. 
. 
. *Overall Effects
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid if renewables==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store Renewables
{txt}
{com}.     estimates store Renewables
{txt}
{com}.    predict res, residuals 
{txt}
{com}.  qnorm res, title ("Q-Q plot Renewables")
{res}{txt}
{com}.   graph export QQRenew.png, replace
{txt}{p 0 4 2}
file {bf}
QQRenew.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.   drop res
{txt}
{com}.   
.   quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid if renewl==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store RenewablesLarge
{txt}
{com}.     predict res, residuals 
{txt}
{com}.  qnorm res, title ("Q-Q plot Renewables, Large")
{res}{txt}
{com}.   graph export QQRenew.png, replace
{txt}{p 0 4 2}
file {bf}
QQRenew.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.   drop res
{txt}
{com}.  
.  quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid if green==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store Green
{txt}
{com}.    
.    predict res, residuals 
{txt}
{com}.  qnorm res, title ("Q-Q plot Green")
{res}{txt}
{com}.   graph export QQGreen.png, replace
{txt}{p 0 4 2}
file {bf}
QQGreen.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.   drop res
{txt}
{com}.  
.  quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid if OilCU==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store Oil
{txt}
{com}.        predict res, residuals 
{txt}
{com}.  qnorm res, title ("Q-Q plot Oil")
{res}{txt}
{com}.   graph export QQOil.png, replace
{txt}{p 0 4 2}
file {bf}
QQOil.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.  
.  drop res
{txt}
{com}.  
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid if CoalCU==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store Coal
{txt}
{com}.   
.    predict res, residuals 
{txt}
{com}.  qnorm res, title ("Q-Q plot Coal")
{res}{txt}
{com}.   graph export QQCoal.png, replace
{txt}{p 0 4 2}
file {bf}
QQCoal.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.  
.  *Plot
.  coefplot Renewables Green Oil Coal,  keep(pos ATEhomep neg ATEhomen) scheme(s1mono) xline(0) legend(position(6) rows(1) ) note("Bars indicate 95% confidence intervals")
{res}{txt}
{com}.  graph export Overall.png, replace
{txt}{p 0 4 2}
file {bf}
Overall.png{rm}
saved as
PNG
format
{p_end}

{com}.  
.  *Table
.    
.  esttab using "regression1.tex", replace  ///
>   keep(pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings  \label{c -(}reg1{c )-}) 
{txt}(tabulating estimates stored by eststo; specify "." to tabulate the active results)
{res}{txt}(output written to {browse  `"regression1.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.  
.  
.  *Arch/Garch Models
.  
. 
.  quietly eststo: arch returns2 pos ATEhomep neg ATEhomen mktrf smb hml brentp linear quadr if renewables==1, arch(1/2) garch(1/2) vce(robust)
{txt}
{com}.   estimates store Renewables
{txt}
{com}. 
.   
.  quietly eststo: arch returns2 pos ATEhomep neg ATEhomen mktrf smb hml brentp linear quadr if renewl==1 ,  arch(1/2) garch(1/2) vce(robust)
{txt}
{com}.   estimates store RenewablesLarge
{txt}
{com}.  
.  
.  quietly eststo: arch returns2 pos ATEhomep neg ATEhomen mktrf smb hml brentp linear quadr if green==1 ,  arch(1/2) garch(1/2) vce(robust)
{txt}
{com}.   estimates store Green
{txt}
{com}.    
.  
.  quietly eststo: arch returns2 pos ATEhomep neg ATEhomen mktrf smb hml brentp linear quadr  if OilCU==1 , arch(1/2) garch(1/2) vce(robust)
{txt}
{com}.   estimates store Oil
{txt}
{com}.   
.  
.  quietly eststo: arch returns2 pos ATEhomep neg ATEhomen mktrf smb hml brentp linear quadr  if CoalCU==1 ,  arch(1/2) garch(1/2) vce(robust)
{txt}
{com}.   estimates store Coal
{txt}
{com}.   
.  
.  *Plot
.  coefplot Renewables Green Oil Coal, title("Arch/Garch estimates")  keep(pos ATEhomep neg ATEhomen) scheme(s1mono) xline(0) legend(position(6) rows(1) ) 
{res}{txt}
{com}.  graph export OverallArch.png, replace
{txt}{p 0 4 2}
file {bf}
OverallArch.png{rm}
saved as
PNG
format
{p_end}

{com}.  
.  *Table
.    
.  esttab using "regression1Arch.tex", replace  ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, ARCH/GARCH  \label{c -(}reg2{c )-}) 
{txt}(tabulating estimates stored by eststo; specify "." to tabulate the active results)
{res}{txt}(output written to {browse  `"regression1Arch.tex"'})

{com}.  
.  
.  
.  
.  est clear
{res}{txt}
{com}.  
.  
.  
.  
.  
.  
.  *Overall Effects, alternative definition home country
. quietly eststo: xtreg returns2 pos ATEhomep2 neg ATEhomen2  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if renewables==1 ,  fe robust cluster(cid) 
{txt}
{com}. estimates store Renewables
{txt}
{com}.   quietly eststo: xtreg returns2 pos ATEhomep2 neg ATEhomen2  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if renewl==1 ,  fe robust cluster(cid) 
{txt}
{com}.  estimates store  RenewablesLarge
{txt}
{com}.  quietly eststo: xtreg returns2 pos ATEhomep2 neg ATEhomen2  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if green==1 ,  fe robust cluster(cid)  
{txt}
{com}.    estimates store Green 
{txt}
{com}.  
.  
.  quietly eststo: xtreg returns2 pos ATEhomep2 neg ATEhomen2  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if OilCU==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store Oil
{txt}
{com}.  
. quietly eststo: xtreg returns2 pos ATEhomep2 neg ATEhomen2  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if CoalCU==1 ,  fe robust cluster(cid) 
{txt}
{com}.   estimates store Coal
{txt}
{com}.  
. 
.  *Table
.    
.  esttab using "regression2.tex", replace  ///
>   keep(pos ATEhomep2 neg ATEhomen2) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, home country defined by stock market  \label{c -(}reg2{c )-}) 
{txt}(tabulating estimates stored by eststo; specify "." to tabulate the active results)
{res}{txt}(output written to {browse  `"regression2.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.  
.  
.  *Estimates controlling for events
.  
.    *Controlling for events
. 
. 
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp  i.eventN  if renewables==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp  i.eventN  if renewl==1 ,  fe robust cluster(cid)  
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp i.eventN  if green==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp  i.eventN  if OilCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp i.eventN  if CoalCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. 
.  
.  *Table
.    
.  esttab using "regression3.tex", replace  ///
>   keep(pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, controlling for events  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression3.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.  
.  
.  
. * Per ruling estimates Renewables
. 
.  quietly eststo: xtreg returns2 i.positive i.negative i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if renewables==1 , fe robust cluster(cid) 
{txt}
{com}. 
.   coefplot , keep(*.positive) scheme(s1mono) xline(0)
{res}{txt}
{com}.   
.   graph export RenewPos2.png, replace
{txt}{p 0 4 2}
file {bf}
RenewPos2.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. 
.  quietly eststo: xtreg returns2 i.positive i.negative i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp if renewl==1 , fe robust cluster(cid) 
{txt}
{com}. 
.   coefplot , keep(*.positive) scheme(s1mono) xline(0)
{res}{txt}
{com}.   
.   graph export RenewPosLarge.png, replace
{txt}{p 0 4 2}
file {bf}
RenewPosLarge.png{rm}
saved as
PNG
format
{p_end}

{com}.  
.   
.  esttab using "regression4.tex", replace  ///
>   keep( *.positive) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large", pattern(1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Ruling specific effects of positive rulings  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression4.tex"'})

{com}.  
.   
.   est clear
{res}{txt}
{com}.  
.  *Event plot
.  * i.year##c.month##i.cid
.  
.       quietly: xtreg returns2  i.pday i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid     if renewables==1 , fe vce(cluster cid) 
{txt}
{com}.       estimates store Renewables
{txt}
{com}.               quietly: xtreg returns2  i.pday i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid  if renewl==1 , fe vce(cluster cid) 
{txt}
{com}.       estimates store RenewablesLarge
{txt}
{com}.                quietly: xtreg returns2 i.pday i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid if CoalCU==1 , fe robust cluster(cid) 
{txt}
{com}.     estimates store Coal
{txt}
{com}.           
. 
. coefplot Coal Renewables RenewablesLarge, vertical  keep(*.pday) ///
>          xtitle("Days Before and After Rulings") xscale(titlegap(2))  ///
> note("OLS coefficient estimates (and their 95% confidence intervals) are reported." ///
>           "Model includes company specific 3 Fama French factors, oil price.)",  margin(small)) ///
> graphregion(fcolor(white) lcolor(white) lwidth(vvvthin) ifcolor(white) ilcolor(white)  ///
> ilwidth(vvvthin)) ciopts(lwidth(*3))  
{res}{txt}
{com}. 
.  graph export Days.png, replace
{txt}{p 0 4 2}
file {bf}
Days.png{rm}
saved as
PNG
format
{p_end}

{com}.         
.  *Table
.    
.  esttab Renewables RenewablesLarge Coal using "regressionDays.tex", replace  ///
>   keep(*.pday) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Coal", pattern(1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Daily Effects of Positive Judgments  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regressionDays.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.         
.         
.         
.   est clear
{txt}
{com}.  
.  
.  
.  *Roth test Renewables 
.  
.    quietly: xtreg returns2 day7-day14 i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if renewables==1 , fe robust cluster( cid) 
{txt}
{com}.  pretrends power 0.5, pre(1/4) post(5/8)
{txt}{bf:warning:} option b() detected without option vcov()
{res}Slope for 50% power =   .046104
{txt}
{com}.    pretrends power 0.8, pre(1/4) post(5/8)
{txt}{bf:warning:} option b() detected without option vcov()
{res}Slope for 80% power =  .0730535
{txt}
{com}.  
.     quietly: xtreg returns2 day7-day14 i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if renewl==1 , fe robust cluster( cid) 
{txt}
{com}.  pretrends power 0.5, pre(1/4) post(5/8)
{txt}{bf:warning:} option b() detected without option vcov()
{res}Slope for 50% power =   .060555
{txt}
{com}.    pretrends power 0.8, pre(1/4) post(5/8)
{txt}{bf:warning:} option b() detected without option vcov()
{res}Slope for 80% power =  .0964361
{txt}
{com}.    
.       quietly: xtreg returns2 day7-day14 i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if CoalCU==1 , fe robust cluster( cid) 
{txt}
{com}.  pretrends power 0.5, pre(1/4) post(5/8)
{txt}{bf:warning:} option b() detected without option vcov()
{res}Slope for 50% power =  .0636274
{txt}
{com}.    pretrends power 0.8, pre(1/4) post(5/8)
{txt}{bf:warning:} option b() detected without option vcov()
{res}Slope for 80% power =  .0994696
{txt}
{com}. 
.  
.  *Q-Q plot
. 
.    quietly: xtreg returns2 pos ATEhomep neg ATEhomen i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if renewables==1 , fe robust cluster( cid) 
{txt}
{com}.  predict resi, residuals 
{txt}
{com}.  qnorm resi, title ("Q-Q plot Renewables")
{res}{txt}
{com}.   graph export QQRenew.png, replace
{txt}{p 0 4 2}
file {bf}
QQRenew.png{rm}
saved as
PNG
format
{p_end}

{com}.  
.  drop resi
{txt}
{com}.  
.   quietly: xtreg returns2 pos ATEhomep neg ATEhomen i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if renewl==1 , fe robust cluster( cid) 
{txt}
{com}.  predict resi, residuals 
{txt}
{com}.  qnorm resi, title ("Q-Q plot Large Renewables")
{res}{txt}
{com}.   graph export QQRenewL.png, replace
{txt}{p 0 4 2}
file {bf}
QQRenewL.png{rm}
saved as
PNG
format
{p_end}

{com}.  
.  drop resi
{txt}
{com}.    quietly: xtreg returns2 pos ATEhomep neg ATEhomen i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if CoalCU==1 , fe robust cluster( cid) 
{txt}
{com}.  predict resi, residuals 
{txt}
{com}.  qnorm resi, title ("Q-Q plot Coal")
{res}{txt}
{com}.   graph export QQCoal.png, replace
{txt}{p 0 4 2}
file {bf}
QQCoal.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.     quietly: xtreg returns2 pos ATEhomep neg ATEhomen i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if green==1 , fe robust cluster( cid) 
{txt}
{com}.  predict renew, residuals 
{txt}
{com}.  qnorm renew, title ("Q-Q plot Green")
{res}{txt}
{com}.   graph export QQGreen.png, replace
{txt}{p 0 4 2}
file {bf}
QQGreen.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.   drop renew
{txt}
{com}.   
.     quietly: xtreg returns2 pos ATEhomep neg ATEhomen i.cid##c.mktrf i.cid##c.smb i.cid##c.hml i.cid##c.brentp i.year##c.month##i.cid    if OilCU==1 , fe robust cluster( cid) 
{txt}
{com}.  predict renew, residuals 
{txt}
{com}.  qnorm renew, title ("Q-Q plotOil")
{res}{txt}
{com}.   graph export QQOil.png, replace
{txt}{p 0 4 2}
file {bf}
QQOil.png{rm}
saved as
PNG
format
{p_end}

{com}.   
.   
.  
.   *Robustness to including lagged returns
.   
.   
.      *Controlling for events
. quietly eststo: xtreg returns2 l.returns2 l2.returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewables==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 l.returns2 l2.returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewl==1 ,  fe robust cluster(cid)  
{txt}
{com}. quietly eststo: xtreg returns2 l.returns2 l2.returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp  if green==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 l.returns2 l2.returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if OilCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 l.returns2 l2.returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if CoalCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. 
.  
.  *Table
.    
.  esttab using "regression5.tex", replace  ///
>   keep(*.returns2 pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, controlling for lagged returns  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression5.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.   
.   
.  *Estimates controlling for events
.  
.    *Controlling for events
. 
. 
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewables==1 & year>2017 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewl==1 & year>2017 ,  fe robust cluster(cid)  
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if green==1 & year>2017,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if OilCU==1 & year>2017 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if CoalCU==1 & year>2017 ,  fe robust cluster(cid) 
{txt}
{com}. 
.  
.  *Table
.    
.  esttab using "regression6.tex", replace  ///
>   keep(pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, s2018-2021 period  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression6.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.   
.   
.   
.  *Estimates controlling for events
.  
.    *Excluding oil prices
. 
. 
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml   if renewables==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml   i.eventN  if renewl==1 ,  fe robust cluster(cid)  
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml  i.eventN  if green==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml   i.eventN  if OilCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.cid#c.mktrf i.cid#c.smb i.cid#c.hml  if CoalCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. 
.  
.  *Table
.    
.  esttab using "regression7.tex", replace  ///
>   keep(pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, excluding oil prices from analysis  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression7.tex"'})

{com}.  
.  
.  est clear
{res}{txt}
{com}.  
.  *Estimates controlling for events
.  
.    *Controlling for events
. 
. 
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewables==1  ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewl==1  ,  fe robust cluster(cid)  
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if green==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if OilCU==1  ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if CoalCU==1 ,  fe robust cluster(cid) 
{txt}
{com}. 
.  
.  *Table
.    
.  esttab using "regression8.tex", replace  ///
>   keep(pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, market rate firm dummies interacted with year  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression8.tex"'})

{com}.   
. 
.   
.    *Estimates controlling for events
.  
.    *Controlling for events
.  est clear
{res}{txt}
{com}. 
. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewables==1 & EU==1 ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp    if renewl==1 & EU==1 ,  fe robust cluster(cid)  
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if green==1 & EU==1,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if OilCU==1 & EU==1  ,  fe robust cluster(cid) 
{txt}
{com}. quietly eststo: xtreg returns2 pos ATEhomep neg ATEhomen  i.year#i.cid#c.mktrf i.cid#c.smb i.cid#c.hml i.cid#c.brentp   if CoalCU==1 & EU==1 ,  fe robust cluster(cid) 
{txt}
{com}. 
.  
.  *Table
.    
.  esttab using "regression9.tex", replace  ///
>   keep(pos ATEhomep neg ATEhomen) ///
>  b(2) se(2) nomtitle label star(* 0.10 ** 0.05 *** 0.01) ///
>  booktabs  ///
>    mgroups("Renewables" "Renewables, large firms" "Green" "Oil/Gas" "Coal", pattern(1 1 1 1 1 )  prefix(\multicolumn{c -(}@span{c )-}{c -(}c{c )-}{c -(}) suffix({c )-}) span erepeat(\cmidrule(lr){c -(}@span{c )-}) ) ///
>  title(Overall effects of positive and negative rulings, only EU firms  \label{c -(}reg2{c )-}) 
{res}{txt}(output written to {browse  `"regression9.tex"'})

{com}.   
.   
.   
.   *Summary table
.   
.   collapse returns2 marketvalue cshtrd DEU GBR FRA NLD renewables green OilCU CoalCU, by (cid)
{res}{txt}
{com}. 
. foreach i of varlist returns2-NLD  {c -(}
{txt}  2{com}. local a : variable label `i'
{txt}  3{com}. local a: subinstr local a "(mean) " ""
{txt}  4{com}. label var `i' "`a'"
{txt}  5{com}. {c )-}
{txt}
{com}. 
. label variable returns2 "Daily Returns"
{txt}
{com}. label variable cshtrd "Daily Trading Volume"
{txt}
{com}. label variable marketvalue "Market Value"
{txt}
{com}. label variable DEU "Frankfurt"
{txt}
{com}. label variable GBR "London"
{txt}
{com}. label variable FRA "Paris"
{txt}
{com}. label variable NLD "Amsterdam"
{txt}
{com}. 
. 
.   est clear
{res}{txt}
{com}. eststo grp1: estpost summ  returns2 marketvalue cshtrd DEU GBR FRA NLD if renewables==1

{txt}{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(count)}{space 1}{space 1}{ralign 9:e(sum_w)}{space 1}{space 1}{ralign 9:e(mean)}{space 1}{space 1}{ralign 9:e(Var)}{space 1}{space 1}{ralign 9:e(sd)}{space 1}{space 1}{ralign 9:e(min)}{space 1}{space 1}{ralign 9:e(max)}{space 1}{space 1}{ralign 9:e(sum)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:returns2}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf: .0758794}}}{space 1}{space 1}{ralign 9:{res:{sf:  .011548}}}{space 1}{space 1}{ralign 9:{res:{sf: .1074616}}}{space 1}{space 1}{ralign 9:{res:{sf:-.3218538}}}{space 1}{space 1}{ralign 9:{res:{sf: .2465828}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.883418}}}{space 1}
{space 0}{space 0}{ralign 12:marketvalue}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       31}}}{space 1}{space 1}{ralign 9:{res:{sf:       31}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.29e+10}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.08e+21}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.29e+10}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.03e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.45e+11}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.01e+11}}}{space 1}
{space 0}{space 0}{ralign 12:cshtrd}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf: 943497.3}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.54e+12}}}{space 1}{space 1}{ralign 9:{res:{sf:  2130624}}}{space 1}{space 1}{ralign 9:{res:{sf: 702.6928}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.12e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.59e+07}}}{space 1}
{space 0}{space 0}{ralign 12:DEU}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf: .1842105}}}{space 1}{space 1}{ralign 9:{res:{sf: .1543385}}}{space 1}{space 1}{ralign 9:{res:{sf: .3928595}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        7}}}{space 1}
{space 0}{space 0}{ralign 12:GBR}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf: .1052632}}}{space 1}{space 1}{ralign 9:{res:{sf: .0967283}}}{space 1}{space 1}{ralign 9:{res:{sf: .3110117}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        4}}}{space 1}
{space 0}{space 0}{ralign 12:FRA}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .0512091}}}{space 1}{space 1}{ralign 9:{res:{sf: .2262943}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        2}}}{space 1}
{space 0}{space 0}{ralign 12:NLD}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf:       38}}}{space 1}{space 1}{ralign 9:{res:{sf: .0789474}}}{space 1}{space 1}{ralign 9:{res:{sf: .0746799}}}{space 1}{space 1}{ralign 9:{res:{sf: .2732763}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        3}}}{space 1}

{com}. eststo grp2: estpost summ  returns2 marketvalue cshtrd DEU GBR FRA NLD  if green==1

{txt}{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(count)}{space 1}{space 1}{ralign 9:e(sum_w)}{space 1}{space 1}{ralign 9:e(mean)}{space 1}{space 1}{ralign 9:e(Var)}{space 1}{space 1}{ralign 9:e(sd)}{space 1}{space 1}{ralign 9:e(min)}{space 1}{space 1}{ralign 9:e(max)}{space 1}{space 1}{ralign 9:e(sum)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:returns2}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf: .0584664}}}{space 1}{space 1}{ralign 9:{res:{sf:  .002984}}}{space 1}{space 1}{ralign 9:{res:{sf: .0546264}}}{space 1}{space 1}{ralign 9:{res:{sf:-.2557009}}}{space 1}{space 1}{ralign 9:{res:{sf: .1744007}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.507984}}}{space 1}
{space 0}{space 0}{ralign 12:marketvalue}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf: 6.97e+10}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.05e+22}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.03e+11}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.04e+08}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.99e+11}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.18e+12}}}{space 1}
{space 0}{space 0}{ralign 12:cshtrd}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:  2093845}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.11e+13}}}{space 1}{space 1}{ralign 9:{res:{sf:  4598635}}}{space 1}{space 1}{ralign 9:{res:{sf: 79.63869}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.55e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.26e+08}}}{space 1}
{space 0}{space 0}{ralign 12:DEU}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf: .2166667}}}{space 1}{space 1}{ralign 9:{res:{sf: .1725989}}}{space 1}{space 1}{ralign 9:{res:{sf: .4154502}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:       13}}}{space 1}
{space 0}{space 0}{ralign 12:GBR}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       .1}}}{space 1}{space 1}{ralign 9:{res:{sf: .0915254}}}{space 1}{space 1}{ralign 9:{res:{sf: .3025317}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        6}}}{space 1}
{space 0}{space 0}{ralign 12:FRA}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf: .2166667}}}{space 1}{space 1}{ralign 9:{res:{sf: .1725989}}}{space 1}{space 1}{ralign 9:{res:{sf: .4154502}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:       13}}}{space 1}
{space 0}{space 0}{ralign 12:NLD}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf:       60}}}{space 1}{space 1}{ralign 9:{res:{sf: .1333333}}}{space 1}{space 1}{ralign 9:{res:{sf: .1175141}}}{space 1}{space 1}{ralign 9:{res:{sf: .3428033}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        8}}}{space 1}

{com}. eststo grp3: estpost summ  returns2 marketvalue cshtrd DEU GBR FRA NLD  if OilCU==1

{txt}{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(count)}{space 1}{space 1}{ralign 9:e(sum_w)}{space 1}{space 1}{ralign 9:e(mean)}{space 1}{space 1}{ralign 9:e(Var)}{space 1}{space 1}{ralign 9:e(sd)}{space 1}{space 1}{ralign 9:e(min)}{space 1}{space 1}{ralign 9:e(max)}{space 1}{space 1}{ralign 9:e(sum)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:returns2}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:   .04719}}}{space 1}{space 1}{ralign 9:{res:{sf:  .005121}}}{space 1}{space 1}{ralign 9:{res:{sf: .0715612}}}{space 1}{space 1}{ralign 9:{res:{sf:-.1852417}}}{space 1}{space 1}{ralign 9:{res:{sf: .1543304}}}{space 1}{space 1}{ralign 9:{res:{sf: .8966105}}}{space 1}
{space 0}{space 0}{ralign 12:marketvalue}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       18}}}{space 1}{space 1}{ralign 9:{res:{sf:       18}}}{space 1}{space 1}{ralign 9:{res:{sf: 7.19e+11}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.25e+24}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.12e+12}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.23e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.40e+12}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.29e+13}}}{space 1}
{space 0}{space 0}{ralign 12:cshtrd}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:  4924108}}}{space 1}{space 1}{ralign 9:{res:{sf: 8.54e+13}}}{space 1}{space 1}{ralign 9:{res:{sf:  9238884}}}{space 1}{space 1}{ralign 9:{res:{sf: 10169.36}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.04e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 9.36e+07}}}{space 1}
{space 0}{space 0}{ralign 12:DEU}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .2294157}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:GBR}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf: .5263158}}}{space 1}{space 1}{ralign 9:{res:{sf: .2631579}}}{space 1}{space 1}{ralign 9:{res:{sf: .5129892}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:       10}}}{space 1}
{space 0}{space 0}{ralign 12:FRA}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .2294157}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:NLD}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf:       19}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .0526316}}}{space 1}{space 1}{ralign 9:{res:{sf: .2294157}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}

{com}. eststo grp4: estpost summ  returns2 marketvalue cshtrd DEU GBR FRA NLD  if CoalCU==1

{txt}{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(count)}{space 1}{space 1}{ralign 9:e(sum_w)}{space 1}{space 1}{ralign 9:e(mean)}{space 1}{space 1}{ralign 9:e(Var)}{space 1}{space 1}{ralign 9:e(sd)}{space 1}{space 1}{ralign 9:e(min)}{space 1}{space 1}{ralign 9:e(max)}{space 1}{space 1}{ralign 9:e(sum)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:returns2}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf: .0201483}}}{space 1}{space 1}{ralign 9:{res:{sf: .0177561}}}{space 1}{space 1}{ralign 9:{res:{sf: .1332519}}}{space 1}{space 1}{ralign 9:{res:{sf:-.3260746}}}{space 1}{space 1}{ralign 9:{res:{sf: .1543812}}}{space 1}{space 1}{ralign 9:{res:{sf: .2820764}}}{space 1}
{space 0}{space 0}{ralign 12:marketvalue}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.63e+12}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.50e+25}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.00e+12}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.20e+08}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.90e+13}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.28e+13}}}{space 1}
{space 0}{space 0}{ralign 12:cshtrd}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.79e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 7.24e+15}}}{space 1}{space 1}{ralign 9:{res:{sf: 8.51e+07}}}{space 1}{space 1}{ralign 9:{res:{sf: 17708.03}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.20e+08}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.90e+08}}}{space 1}
{space 0}{space 0}{ralign 12:DEU}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf: .0714286}}}{space 1}{space 1}{ralign 9:{res:{sf: .0714286}}}{space 1}{space 1}{ralign 9:{res:{sf: .2672612}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:GBR}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf: .5714286}}}{space 1}{space 1}{ralign 9:{res:{sf: .2637363}}}{space 1}{space 1}{ralign 9:{res:{sf: .5135526}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        8}}}{space 1}
{space 0}{space 0}{ralign 12:FRA}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}
{space 0}{space 0}{ralign 12:NLD}{space 1}{c |}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:       14}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}

{com}. esttab grp*,  cells("mean(fmt(%6.2fc)) sd  count(fmt(0))")  mtitle("Renewables" "Green" "Oil/Gas" "Coal")
{res}
{txt}{hline 168}
{txt}                      (1)                                    (2)                                    (3)                                    (4)                          
{txt}               Renewables                                  Green                                Oil/Gas                                   Coal                          
{txt}                     mean           sd        count         mean           sd        count         mean           sd        count         mean           sd        count
{txt}{hline 168}
{txt}returns2    {res}         0.08         0.11           38         0.06         0.05           60         0.05         0.07           19         0.02         0.13           14{txt}
{txt}marketvalue {res}      1.3e+10      3.3e+10           31      7.0e+10      1.0e+11           60      7.2e+11      1.1e+12           18      1.6e+12      5.0e+12           14{txt}
{txt}cshtrd      {res}      9.4e+05      2.1e+06           38      2.1e+06      4.6e+06           60      4.9e+06      9.2e+06           19      2.8e+07      8.5e+07           14{txt}
{txt}DEU         {res}         0.18         0.39           38         0.22         0.42           60         0.05         0.23           19         0.07         0.27           14{txt}
{txt}GBR         {res}         0.11         0.31           38         0.10         0.30           60         0.53         0.51           19         0.57         0.51           14{txt}
{txt}FRA         {res}         0.05         0.23           38         0.22         0.42           60         0.05         0.23           19         0.00         0.00           14{txt}
{txt}NLD         {res}         0.08         0.27           38         0.13         0.34           60         0.05         0.23           19         0.00         0.00           14{txt}
{txt}{hline 168}
{txt}N           {res}           38                                     60                                     19                                     14                          {txt}
{txt}{hline 168}

{com}. 
.  
. esttab grp* using "summarytable.tex", replace ///
>    cells("mean(fmt(%6.2fc))")  nostar nonumber unstack ///
>    compress nonote noobs gap label booktabs    ///
>     mtitle("Renewables" "Green" "Oil/Gas" "Coal")
{res}{txt}(output written to {browse  `"summarytable.tex"'})

{com}.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
.   
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\ev42\Dropbox\ClimateStockMarket\Data\ReplicationLog.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}12 Mar 2024, 14:09:06
{txt}{.-}
{smcl}
{txt}{sf}{ul off}